<template>
	<view class="wrap"><web-view :webview-styles="webviewStyles" :src="url"  @message='getMsg'></web-view></view>
</template>

<script>
export default {
	data() {
		return {
			url: '',
			type:'',
			webviewStyles: {
				'min-height': '100vh'
			}
		};
	},
	onLoad(options) {
	// 	this.type=options.type
	// 	console.log(this.type)
	// 	if(this.type){
			this.SignContractURL();
	// 	}else{
		
	// 	}
	},
	methods: {
		SignContractURL() {
			this.$api.bindbank.SignContractURL().then(res => {
				console.log();
				this.url = res.data.uRl;
				 // this.url='https://ztcbs.yzsheng.com/agreementh5/success.html?code=tl'
			});
		},
		getMsg(){
			// console.log('msg1111111')
			uni.navigateTo({
			  url: '/pages_common/pages_me/assets/bindPhoneResult/bindPhoneResult'
			})
		}
	}
};
</script>

<style scoped lang="scss">
.wrap {
	width: 100%;
	min-height: 100vh;
}
</style>
